package com.harlan.viewbindingstudy;

import android.os.Bundle;


import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.harlan.viewbindingstudy.databinding.FragmentBlank2Binding;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;


public class BlankFragment2 extends Fragment {


    public BlankFragment2() {
    }


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    FragmentBlank2Binding blank2Binding;
    ComAAdapter aAdapter;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        Log.e("backinfo", "BlankFragment2onCreateView");
        blank2Binding = FragmentBlank2Binding.inflate(inflater, container, false);
        return blank2Binding.getRoot();
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        blank2Binding.list.setLayoutManager(new LinearLayoutManager(getActivity()));
        aAdapter = new ComAAdapter(getActivity());
        blank2Binding.list.setAdapter(aAdapter);
    }

    @Override
    public void onDestroy() {
        blank2Binding = null;
        super.onDestroy();
    }
}